<link href="/classico/public/assets/front-end/css/user-order/index.css"
      rel="stylesheet" type="text/css"/>
<div id="user-order">
    <div id="user-order-title">
        <h3>USER ORDERS</h3>
    </div>
    <div class="datagrid">
        <table>
            <tr>
                <th>Name</th>
                <th>Created Date</th>
                <th>Total Cost</th>
                <th class="center">Is Process</th>
                <th>Report</th>
            </tr>
            <?php
            $orders = $this->orders;
            foreach ($orders as $index => $order) :
                ?>
                <tr class="<?= ($index % 2 == 0) ? 'alt' : '' ?>">
                    <td><?= $order['Name'] ?></td>
                    <td><?= $order['CreatedDate'] ?></td>
                    <td><?= $order['TotalCost'] ?></td>
                    <td class="center">
                        <?php
                        if (!$order['IsProcess']) :
                            ?>
                            <div class="block-icon tool-icon"></div>
                        <?php
                        endif;
                        if ($order['IsProcess']) :
                            ?>
                            <div class="confirm-icon tool-icon"></div>
                        <?php
                        endif
                        ?>
                    </td>
                    <td><a href="">report</a></td>
                </tr>
            <?php
            endforeach
            ?>
        </table>
    </div>
    <?= $this->paginationControl($this->paginator, 'Sliding', 'my_pagination_control.phtml') ?>
    <div id="user-order-message">
        <span>
            <?= $this->numberOfProcessedOrders == 0 ? 'No' :
                $this->numberOfProcessedOrders ?> Processed
        </span>
    </div>
</div>
